<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			var friends = ["Mike", "Stacy", "Andy", "Rick"];​
			friends.forEach(function(eachName, index) {
				console.log(index + 1 + ". " + eachName); // 1. Mike, 2. Stacy, 3. Andy, 4. Rick​
			});
		</script>
	</body>

</html>